function [db mk] = checkDBValues(I1, I2)
%CHECKDBVALUES compares actual dartboard values to default dartboard values
%   (calculated during intitialization) and replaces misdetected values 
%   (greater than a threshold) with their defaults.

% Project:  Dart detection [Bildfolgen LU]@CVL/TUWIEN
% Author:   Thomas Rittler
% Date:     06/2011

global dbdef mkdef

DB_DELTA = 5;                  % dartboard deviation limit

[db(1,:) mk(1,:)] = getDartBoard(I1);
[db(2,:) mk(2,:)] = getDartBoard(I2);

dbidx = abs(db-dbdef)>DB_DELTA;     % dartboard
mkidx = abs(mk-mkdef)>DB_DELTA*2;   % marker

db(dbidx) = dbdef(dbidx);
mk(mkidx) = mkdef(mkidx);